<?php


namespace paySdk\functions\postar\lib\Request\Body\Tag;


class UnionPayTag extends Tag
{
    private $union_pay_tag_available_parameters = [];
    private $auto_init_parameters = [];

    public function __construct($parameters = [])
    {
        $this->__set("timestamp", time());
        $this->available_parameters = array_merge($this->available_parameters, $this->union_pay_tag_available_parameters);

        $auto_init_parameters = $this->auto_init_parameters;
        array_walk($auto_init_parameters, function ($value, $ele) {
            $this->__set($ele, $value);
        });

        if (! empty($parameters)) {
            array_walk($parameters, function ($item, $key) {
                $this->__set($key, $item);
            });
            $this->chkParam();
        }
    }

}